package com.sci.feign;

import com.sci.entity.Business;
import com.sci.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "user-service")
public interface UserServiceFeign {
    @GetMapping("user/{id}")
    User getUser(@PathVariable(value = "id") Integer id);


    // POST: 创建商户
    @PostMapping("/user")
    String createUser(@RequestBody User user);

    // PUT: 更新商户
    @PutMapping("/user/{id}")
    String updateUser(@PathVariable("id") Integer id, @RequestBody User user);

    // DELETE: 删除商户
    @DeleteMapping("/user/{id}")
    String deleteUser(@PathVariable("id") Integer id);
}